package com.tianzeculture.stagebao.activity.mine;

import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.widget.TextView;

import com.tianzeculture.stagebao.R;
import com.tianzeculture.stagebao.base.BaseActivity;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/8/16.
 */

public class MyNoticeActivity extends BaseActivity {

    @BindView(R.id.tvTitle)
    TextView tvTitle;
    @BindView(R.id.tabLayout)
    TabLayout tabLayout;
    @BindView(R.id.viewPager)
    ViewPager viewPager;
    ArrayList<Fragment> fragmentList = new ArrayList<>();
    ArrayList<String> titleList = new ArrayList<>();


    @Override
    protected int getLayoutResID() {
        return R.layout.activity_my_notice;
    }

    @Override
    public void initUI() {
        super.initUI();
        tvTitle.setText("我的通告");

        titleList.add("已投递");
        titleList.add("已沟通");
        fragmentList.add(MyNoticeFrament.newInstance(1)
        );
        fragmentList.add(MyNoticeFrament.newInstance(2));
        viewPager.setAdapter(new NoticePagerAdapter(getSupportFragmentManager(), titleList, fragmentList));
        tabLayout.setupWithViewPager(viewPager);
    }
}